package gat.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

/**
 * 采购
 */
@Getter
@AllArgsConstructor
@NoArgsConstructor
public enum EntrustOrderStatusEnum {

    NORMAL("正常", 1),
    LOCKED("锁定", 2),
    CLOSED("关闭",3),

    ;

    private String description;
    private Integer code;
    public static EntrustOrderStatusEnum getByCode(String code) {
        for (EntrustOrderStatusEnum typeEnum : values()) {
            if (String.valueOf(typeEnum.getCode()).equals(code)) {
                return typeEnum;
            }
        }
        return null;
    }

}
